<?php
    function get_sessions()
	{
		$result = mysql_query("SELECT * FROM sessions WHERE `clients` < `max_clients`");
		while($temp = mysql_fetch_assoc($result))
		{
			$array[] = $temp;
		}
		return $array;
	}
	
	function get_game($which, $who)
	{
		if (isset($who))
			$result = mysql_query("SELECT * FROM sessions WHERE `id` = $which");
		
	}
?>